package ogmios.components.munches;

import java.util.*;
import java.io.*;
import ogmios.components.templatetags.*;
/**
 * An interface for plugins in Ogmios, particularly those intended to be developed in Munchkin.
 */
public interface Munch
{
 /**
 * Returns a basic template for coding the given Munch
 */
 String getTemplate();
 /**
 * Returns the TemplateTags to be used to process the template returned by getTemplate()
 */
 Set<TemplateTag> getTemplateTags();
 /**
 * Returns the folder munches are supposed to be deposited.
 */
 String getFolder();
 /**
 * Returns the name of the plugin this Munch builds
 */
 String getName();
 /**
 * Returns a map of settings for compiling this Munch.
 */
 Map<String, MunchSetting> getSettings();
 /**
 * Returns the class type of the plugins this Munch builds
 */
 Class getMunchType();
 /**
 * Compiles the file at fileName using the passed settings.<br>
 * For each MunchSetting returned by getSettings(), there should be a non-null
 * value in the settings map.
 */
 Process compile(String fileName, Map<String, Object> settings) throws IOException;
 /**
 * Settings for compiling a Munch's plugin.
 */
 public static enum MunchSetting
 {
  /**
  * A single-line string
  */
  STRING,
  /**
  * An array of Strings
  */
  ARRAY,
  /**
  * A true or false value.
  */
  BOOLEAN
 }
}
